REM backup the file to test and stubbing function.  
python stub_tool/stub_tool.py c_file_path=.\src\%1\%2.c

REM start compile.   if you don't have command 'make',then may be you need to copy C:\MinGW\bin\mingw32-make.exe to C:\MinGW\bin\make.exe
make clean

make

REM restore the c file.
echo f| move .\src\%1\%2.c.bak .\src\%1\%2.c

REM execute and catch the print log.
workspace.exe > .\test_protocol.txt

REM generate coverage protocol for report pdf.  **should be edited for which unit you want to have coverage.
gcov -o src\%1  %2.c > .\coverage_protocol.txt

REM execute python tool to generate report pdf.
python test_tools/generate_report.py test_protocol.txt coverage_protocol.txt

mkdir test_reports

REM generate coverage html report.
python -m gcovr -r . --html --html-details -o .\test_reports\coverage.html

REM delete temp files.
del unit_test_report.toc
del unit_test_report.zip
del unit_test_report.aux
del unit_test_report.out
del unit_test_report.log
del *.gcov

REM open report pdf file
unit_test_report.pdf






